home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / comt010d.zip / COMTARC.BAT < prev    next >
DOS Batch File  |  1992-06-18  |  1KB  |  35 lines

  1. @echo off
  2. if %1!==-w! set _encsfx=W
  3. if not %1!==-w! set _encsfx=
  4. if %1!==-w! shift
  5. if %1!==-! shift
  6. if %2!==! goto usage
  7. lharc a t$pesfx0 %2 %3 %4 %5 %6 %7 %8 %9
  8. if errorlevel 1 goto clean_error
  9. lharc s t$pesfx0
  10. if exist t$pesfx0.lzh del t$pesfx0.lzh
  11. if not exist t$pesfx0.com goto notexist_sfx
  12. if not %_encsfx%!==W! comt t$pesfx0.com %1
  13. if %_encsfx%!==W! comt -w -n %1.com t$pesfx0.com %1
  14. del t$pesfx0.com
  15. goto end
  16. :clean_error
  17. if exist t$pesfx0.lzh del t$pesfx0.lzh
  18. echo Error making t$pesfx0.lzh.
  19. goto end
  20. :notexist_sfx
  21. if exist t$pesfx0.exe goto toobig
  22. echo Error making t$pesfx0.com.
  23. goto end
  24. :toobig
  25. del t$pesfx0.exe
  26. echo Sorry, but you have too much data to fit in a .COM file.
  27. goto end
  28. :usage
  29. echo ┌──────────────────────────────────────────────────────────┐
  30. echo │ Usage:                                                   │
  31. echo │  comtarc [-w] outname[.EXT] file1 [file2 ...]            │
  32. echo └──────────────────────────────────────────────────────────┘
  33. if not %_encsfx%!==! set _encsfx=
  34. :end
  35.